cmake_minimum_required(VERSION 3.20)
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/build-conan/conan_toolchain.cmake")

project(demo LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 让 CMake 找到 Conan 生成的依赖文件
find_package(fmt      REQUIRED)
find_package(spdlog   REQUIRED)
find_package(nlohmann_json REQUIRED)

add_executable(demo src/main.cpp)
target_link_libraries(demo
    PRIVATE
        fmt::fmt
        spdlog::spdlog
        nlohmann_json::nlohmann_json
)

#***********
# cmake -B build-ninja -G 'Ninja Multi-Config' -DCMAKE_EXPORT_COMPILE_COMMANDS=ON